/**
 * 
 */
package com.cdfahe.common.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Roy
 *
 */
public class SearchCondition{
	
	
	public final static String VALUETYPE_TEXT="1";
	public final static String VALUETYPE_DATE="2";
	public final static String VALUETYPE_DYNAMICLIST="3";
	public final static String VALUETYPE_STATICLIST="4";
	
	public final static String[] COMPARE_1 = new String[]{"is","is not"};
	public final static String[] COMPARE_2 = new String[]{"contains","not contains"};
	public final static String[] COMPARE_3 = new String[]{"in"}; // 日期
	
	public SearchCondition(){}
	
	/** 界面显示的名字 */
	private String name;
	
	/** 数据库对应的字段 */
	private String dbfield;
	
	/** 比较符集合的类型 */
	private String compare;
	
	/** 文本框 =1，两个日期控件 =2，动态数据的下拉列表=3  固定数据的下拉列表=4*/
	private String valuetype;
	
	/**	最终用户输入的文本段，以及用户选总的下拉项的value	 */
	private String value;	
	
	/** 选中的比较符	 */
	private String selectCompare;
	
	/** 如果type为2 ,则此字段保存开始时间的值	 */
	private String startDate;
	
	/** 如果valuetype为2 ,则此字段保存结束时间的值	 */
	private String endDate;
	
	/** 是否多选	 */
	private boolean isMultSelect = false;
	
	/** 是否显示 */
	private boolean isShow = false;

	/** 比较符的集合  */
	private List<String> compares;
	
	/** 比较符的值 */
	private String comparesvalue;
	
	/** 具体的值 */ 
	private String valuevalue;
	
	
	/**	  值为下拉或列表时的数据列表	 */
	private Map<String,String> mapValues= new HashMap<String,String>();

	/**
	 * @return the mapValues
	 */
	public Map<String, String> getMapValues() {
		return mapValues;
	}

	/**
	 * @param mapValues the mapValues to set
	 */
	public void setMapValues(Map<String, String> mapValues) {
		this.mapValues = mapValues;
	}

	


	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}


	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}


	/**
	 * @return the dbfield
	 */
	public String getDbfield() {
		return dbfield;
	}


	/**
	 * @param dbfield the dbfield to set
	 */
	public void setDbfield(String dbfield) {
		this.dbfield = dbfield;
	}


	/**
	 * @return the compare
	 */
	public String getCompare() {
		return compare;
	}


	/**
	 * @param compare the compare to set
	 */
	public void setCompare(String compare) {
		this.compare = compare;
	}


	/**
	 * @return the valuetype
	 */
	public String getValuetype() {
		return valuetype;
	}


	/**
	 * @param valuetype the valuetype to set
	 */
	public void setValuetype(String valuetype) {
		this.valuetype = valuetype;
	}


	/**
	 * @return the value
	 */
	public String getValue() {
		return value;
	}


	/**
	 * @param value the value to set
	 */
	public void setValue(String value) {
		this.value = value;
	}


	/**
	 * @return the selectCompare
	 */
	public String getSelectCompare() {
		return selectCompare;
	}


	/**
	 * @param selectCompare the selectCompare to set
	 */
	public void setSelectCompare(String selectCompare) {
		this.selectCompare = selectCompare;
	}


	/**
	 * @return the startDate
	 */
	public String getStartDate() {
		return startDate;
	}


	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}


	/**
	 * @return the endDate
	 */
	public String getEndDate() {
		return endDate;
	}


	/**
	 * @param endDate the endDate to set
	 */
	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}


	/**
	 * @return the compares
	 */
	public List<String> getCompares() {
		return compares;
	}


	/**
	 * @param compares the compares to set
	 */
	public void setCompares(List<String> compares) {
		this.compares = compares;
	}
	/**
	 * @return the isMultSelect
	 */
	public boolean getIsMultSelect() {
		return isMultSelect;
	}


	/**
	 * @param isMultSelect the isMultSelect to set
	 */
	public void setIsMultSelect(boolean isMultSelect) {
		this.isMultSelect = isMultSelect;
	}

	/**
	 * @return the isShow
	 */
	public boolean getIsShow() {
		return isShow;
	}

	/**
	 * @param isShow the isMultSelect to set
	 */
	public void setIsShow(boolean isShow) {
		this.isShow = isShow;
	}

	/**
	 * @return the comparesvalue
	 */
	public String getComparesvalue() {
		return comparesvalue;
	}

	/**
	 * @param comparesvalue the comparesvalue to set
	 */
	public void setComparesvalue(String comparesvalue) {
		this.comparesvalue = comparesvalue;
	}

	/**
	 * @return the valuevalue
	 */
	public String getValuevalue() {
		return valuevalue;
	}

	/**
	 * @param valuevalue the valuevalue to set
	 */
	public void setValuevalue(String valuevalue) {
		this.valuevalue = valuevalue;
	}
}
